<template>
  <div class="userinfo">
    <h3>我是个人信息组件</h3>
    <div>姓名：{{ username }}</div>
    <div>年龄：{{ age }}</div>
    <div>座驾：{{ car.brand }}</div>
    
    <div>是否单身：{{ isSingle?'是':'否' }}</div>
    <div>兴趣爱好：{{ hobby.join('、') }}</div>
  </div>
</template>

<script>
export default {
props:['username','age','car','isSingle','hobby']
}
</script>

<style scoped>
.userinfo{
  width: 300px;
  padding: 10px;
  border: 2px solid black;
  background-color: green;
  color: white;
}
.userinfo > div{
  display: flex;
  justify-content: space-between;
}

</style>